Subscribe Us

Responsive Advertisement

Advertisement

URI Online Judge | 2982 The Strike Stops or Continues? solution in c

 

uri 2982 solution in c

by ujjal roy



#include<stdio.h>


main()

{

    int t,g=0,v=0,n;

    char a[20];

   scanf("%d",&t);

    while(t--)

    {

       scanf("%s%d",a,&n);

        if(a[0]=='G') g=g+n;

        else v+=n;

    }


    if(v>=g) printf("A greve vai parar.\n");

    else printf("NAO VAI TER CORTE, VAI TER LUTA!\n");

    return 0;

}


Post a Comment

0 Comments